import DataEntity from '../DataEntity';

/**
 * 用户的状态
 */
export enum UserStatus {
    NOMAL = 1,
    LOCK
}

/**
 * 用户实体
 */
export default class User extends DataEntity {
    /**
     * 账号
     */
    private _account: string = '';
    /**
     * 姓名
     */
    private _name: string = '';
    /**
     * 电话
     */
    private _phone: string = '';
    /**
     * 性别
     */
    private _sex: string = '';
    /**
     * 密码
     */
    private _password: string = '';
    /**
     * 状态1正常、2锁定
     */
    private _status: number = UserStatus.NOMAL;

    set account(account: string) {
        this._account = account;
    }
    get account() {
        return this._account;
    }
    set name(name: string) {
        this._name = name;
    }
    get name() {
        return this._name;
    }
    set phone(phone: string) {
        this._phone = phone;
    }
    get phone() {
        return this._phone;
    }
    set sex(sex: string) {
        this._sex = sex;
    }
    get sex() {
        return this._sex;
    }
    set password(password: string) {
        this._password = password;
    }
    get password() {
        return this._password;
    }
    set status(status: UserStatus) {
        this._status = status;
    }
    get status() {
        return this._status;
    }
}
